package cn.lystudio.rohmtimeopwide_background_v11.mapper;

import cn.lystudio.rohmtimeopwide_background_v11.entity.po.UsersPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UsersPOMapper extends BaseMapper<UsersPO> {
    @Select("SELECT * " +
            "FROM t_users  " +
            "WHERE 1=1  " +
            "AND userCode=#{userCode}   " +
            "ORDER BY userID  " +
            "LIMIT 1")
    UsersPO get1NoCondition(UsersPO usersPO);

    @Update("UPDATE t_users  " +
            "SET userFullName=#{userFullName},  " +
            "userPassword='8888',   " +
            "roleID=#{roleID},    " +
            "enabled=1,    " +
            "deleted=0     " +
            "WHERE userCode=#{userCode}")
    int uptUserNoCondition(UsersPO usersPO);
}
